package com.netease.pris.a;

import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Environment;
import android.os.StatFs;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.view.Display;
import android.view.WindowManager;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;

public class e
{
  static final String a = "(?i)((http|https|ftps|sftp|3g|wap)://)?((((3g|wap|www)\\.)?([a-zA-Z0-9\\u4e00-\\u9fa5\\._-]+\\.[a-zA-Z]{2,6}))|([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}))(:[0-9]{1,6})?(/[a-zA-Z0-9$-&(-/!:;=_\\u4e00-\\u9fa5]*)*(\\?([a-zA-Z0-9$-&(-/!:;_\\u4e00-\\u9fa5]*(=[a-zA-Z0-9$-&(-/!:;_\\u4e00-\\u9fa5]*)*)?)?";
  static Pattern b = Pattern.compile("(?i)((http|https|ftps|sftp|3g|wap)://)?((((3g|wap|www)\\.)?([a-zA-Z0-9\\u4e00-\\u9fa5\\._-]+\\.[a-zA-Z]{2,6}))|([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}))(:[0-9]{1,6})?(/[a-zA-Z0-9$-&(-/!:;=_\\u4e00-\\u9fa5]*)*(\\?([a-zA-Z0-9$-&(-/!:;_\\u4e00-\\u9fa5]*(=[a-zA-Z0-9$-&(-/!:;_\\u4e00-\\u9fa5]*)*)?)?");
  static final String c = "<(?i)img\\s+[^>]+>";
  static final String d = "<(?i)link\\s+[^>]+>";
  static final String e = "<(?i)script\\s+[^>]+>";
  static Pattern f = Pattern.compile("(<(?i)link\\s+[^>]+>|<(?i)img\\s+[^>]+>|<(?i)script\\s+[^>]+>)");
  public static final Pattern g = Pattern.compile("[a-zA-Z0-9\\+\\.\\_\\%\\-]{1,256}\\@[a-zA-Z0-9][a-zA-Z0-9\\-]{0,64}(\\.[a-zA-Z0-9][a-zA-Z0-9\\-]{0,25})+");
  public static final Pattern h = Pattern.compile("^\\d{11}$");
  private static final int i = 1024;

  public static InputStream a(String paramString)
  {
    return new ByteArrayInputStream(paramString.getBytes());
  }

  public static InputStream a(byte[] paramArrayOfByte)
  {
    if (paramArrayOfByte == null)
      paramArrayOfByte = "".getBytes();
    return new ByteArrayInputStream(paramArrayOfByte);
  }

  public static String a(Context paramContext)
  {
    String str = "";
    try
    {
      str = paramContext.getPackageManager().getPackageInfo(paramContext.getPackageName(), 0).versionName;
      return str;
    }
    catch (PackageManager.NameNotFoundException localNameNotFoundException)
    {
      while (true)
        localNameNotFoundException.printStackTrace();
    }
  }

  public static String a(InputStream paramInputStream)
  {
    BufferedReader localBufferedReader = new BufferedReader(new InputStreamReader(paramInputStream));
    StringBuffer localStringBuffer = new StringBuffer();
    while (true)
    {
      String str = localBufferedReader.readLine();
      if (str == null)
        break;
      localStringBuffer.append(str);
      localStringBuffer.append("\n");
    }
    return localStringBuffer.toString();
  }

  public static boolean a()
  {
    if ("mounted".equals(Environment.getExternalStorageState()));
    for (int j = 1; ; j = 0)
      return j;
  }

  public static boolean a(File paramFile1, File paramFile2)
  {
    int j = 0;
    if (!paramFile1.exists());
    while (true)
    {
      return j;
      if (!paramFile2.getParentFile().exists())
        paramFile2.getParentFile().mkdir();
      FileInputStream localFileInputStream;
      ZipOutputStream localZipOutputStream;
      try
      {
        localFileInputStream = new FileInputStream(paramFile1);
        localZipOutputStream = new ZipOutputStream(new FileOutputStream(paramFile2));
        byte[] arrayOfByte = new byte[1024];
        localZipOutputStream.putNextEntry(new ZipEntry(paramFile1.getName()));
        while (true)
        {
          int k = localFileInputStream.read(arrayOfByte);
          if (k <= 0)
            break;
          localZipOutputStream.write(arrayOfByte, 0, k);
        }
      }
      catch (Exception localException)
      {
        localException.printStackTrace();
      }
      continue;
      localZipOutputStream.closeEntry();
      localFileInputStream.close();
      localZipOutputStream.close();
      j = 1;
    }
  }

  public static long b()
  {
    long l;
    if (a())
    {
      StatFs localStatFs = new StatFs(Environment.getExternalStorageDirectory().getPath());
      l = localStatFs.getBlockSize() * localStatFs.getAvailableBlocks();
    }
    while (true)
    {
      return l;
      l = -1L;
    }
  }

  public static String b(Context paramContext)
  {
    Object localObject = "";
    try
    {
      localObject = paramContext.getPackageManager().getPackageInfo(paramContext.getPackageName(), 0).versionName;
      String str = ((String)localObject).trim();
      localObject = str;
      label28: if ((localObject != null) && (((String)localObject).length() > 0))
      {
        int j = ((String)localObject).indexOf(' ');
        if (j > 0)
          localObject = ((String)localObject).substring(0, j);
      }
      return localObject;
    }
    catch (PackageManager.NameNotFoundException localNameNotFoundException)
    {
      break label28;
    }
  }

  public static List b(String paramString)
  {
    ArrayList localArrayList = new ArrayList();
    if (TextUtils.isEmpty(paramString));
    while (true)
    {
      return localArrayList;
      Matcher localMatcher = f.matcher(paramString);
      while (localMatcher.find())
      {
        int j = localMatcher.start();
        int k = localMatcher.end();
        localArrayList.add(new c(paramString.substring(j, k), j, k));
      }
    }
  }

  public static byte[] b(InputStream paramInputStream)
  {
    ByteArrayOutputStream localByteArrayOutputStream = new ByteArrayOutputStream();
    try
    {
      byte[] arrayOfByte2 = new byte[1024];
      int k;
      for (int j = paramInputStream.read(arrayOfByte2); j > 0; j = k)
      {
        localByteArrayOutputStream.write(arrayOfByte2, 0, j);
        k = paramInputStream.read(arrayOfByte2);
      }
      System.gc();
      arrayOfByte1 = localByteArrayOutputStream.toByteArray();
      return arrayOfByte1;
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
    finally
    {
      while (true)
      {
        System.gc();
        byte[] arrayOfByte1 = localByteArrayOutputStream.toByteArray();
      }
    }
  }

  public static String c(Context paramContext)
  {
    DisplayMetrics localDisplayMetrics = new DisplayMetrics();
    ((WindowManager)paramContext.getSystemService("window")).getDefaultDisplay().getMetrics(localDisplayMetrics);
    String str1 = new Integer(localDisplayMetrics.widthPixels).toString();
    String str2 = new Integer(localDisplayMetrics.heightPixels).toString();
    return str1 + "x" + str2;
  }

  public static List c(String paramString)
  {
    ArrayList localArrayList = new ArrayList();
    if (TextUtils.isEmpty(paramString));
    while (true)
    {
      return localArrayList;
      Matcher localMatcher = b.matcher(paramString);
      while (localMatcher.find())
        localArrayList.add(localMatcher.group());
    }
  }

  public static boolean d(String paramString)
  {
    return g.matcher(paramString).matches();
  }

  public static boolean e(String paramString)
  {
    return h.matcher(paramString).matches();
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.pris.a.e
 * JD-Core Version:    0.6.0
 */